package com.qiyuesuo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qiyuesuo.domain.MyFile;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author  王帅涛
 * @date  2021/5/28 19:53
 */

public interface FileService extends IService<MyFile>{
    /**
     * 上传文件
     * @param file 文件
     * @return uuid
     */
    String uploadFile(MultipartFile file) throws IOException;

    /**
     * 下载文件
     * @param fileId
     * @param response
     * @return
     */
    void downloadFile(String fileId, HttpServletResponse response) throws Exception;
}
